package testes;


import javax.swing.text.DefaultStyledDocument;

import view.BuscaPeUI;
import view.MenuDemo;
import view.MyPanel;
import view.MyTextPane;
import view.TextFields;
import fachada.BuscapeFachada;
import model.Patente;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;


/**
 * PatenteTeste
 * @author Adriano de Albuquerque Batista
 * @author Alfeu Buriti
 * @author Pablo Diego Alencar
 * @author Yuri Cariry Cabral de Melo
 *
 */
public class PatenteTeste extends TestCase {
	
	/**
	 * suite
	 * @return Test
	 */
	public static Test suite() {
		return new TestSuite(PatenteTeste.class);

	}

	
	/**
	 * main
	 * @param args
	 */
	public static void main(String[] args) {
		junit.textui.TestRunner.run(suite());
	}

	
	/**
	 * testEquals
	 */
	public void testEquals() {
		BuscapeFachada  bp = new BuscapeFachada();
		
		Patente patente = bp.criarPatente("titulo1" ,"absTract1" ,"description1", "claims1");
		assertNotNull(patente);
		assertEquals("titulo1", patente.getTitle());
		assertEquals("absTract1", patente.getAbsTract());
		assertEquals("description1", patente.getDescription());
		assertEquals("claims1", patente.getClaims());	
	
		patente.setTitle("titulo2");
		patente.setAbsTract("absTract2");
		patente.setDescription("description2");
		patente.setClaims("claims2");
		
		assertEquals("titulo2", patente.getTitle());
		assertEquals("absTract2", patente.getAbsTract());
		assertEquals("description2", patente.getDescription());
		assertEquals("claims2", patente.getClaims());	
		
		
		BuscaPeUI buscaPeUI = bp.criarBuscaPeUI();
		assertNotNull(buscaPeUI);
		
		MyTextPane myTextPane = bp.criarMyTextPane();
		assertNotNull(myTextPane);
		
		TextFields myTextFields = bp.criarTextFields(buscaPeUI);
		assertNotNull(myTextFields);
		
		MyPanel myPanel = bp.criarMyPanel(buscaPeUI);
		assertNotNull(myPanel);
		
		MenuDemo menuDemo = bp.criarMenuDemo(buscaPeUI);
		assertNotNull(menuDemo);
						
	}



}
